<page-header></page-header>

<mat-card>
  <mat-card-title>Simple</mat-card-title>

  <form [formGroup]="form" (ngSubmit)="submit()">
    <formly-form [form]="form" [fields]="fields" [model]="model"></formly-form>
    <button mat-raised-button color="primary">Submit</button>
  </form>
</mat-card>

<mat-card>
  <mat-card-title>Advanced Layout</mat-card-title>

  <form [formGroup]="form2" (ngSubmit)="submit2()">
    <formly-form [model]="model2" [fields]="fields2" [options]="options" [form]="form2">
    </formly-form>
    <button mat-raised-button color="primary" [disabled]="!form2.valid">Submit</button>
  </form>
</mat-card>